home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1995 November / EnigmA AMIGA RUN 02 (1995)(G.R. Edizioni)(IT)[!][issue 1995-11][Skylink CD].iso / earcd / util / misc / tritonrexx376.lha / TritonRexx / Rexx / ButtonDemo.rexx < prev    next >
OS/2 REXX Batch file  |  1995-09-16  |  3KB  |  124 lines

  1. /*
  2. ** $VER: TritonRexx Button-Demo 1.0 (2.8.95)
  3. */
  4.  
  5. /*
  6. ** Library mit *erhöhter* *Priorität* einbinden! Wenn noch andere
  7. ** Libraries eingebunden sind wird dies die Arbeitsgeschwindigkeit
  8. ** des Scripts positiv beeinflussen, da die 'tritonrexx.library'
  9. ** dann wegen ihrer Priorität immer als erstes nach Funktionen
  10. ** durchsucht wird.
  11. */
  12.  
  13. IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
  14.    IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
  15.       SAY 'Kann die <tritonrexx.library> nicht öffnen!'
  16.       EXIT(10)
  17.    END
  18. END
  19.  
  20.  
  21. /*
  22. ** Definitionen
  23. */
  24.  
  25. apptags =      'TRCA_Name     Buttons',
  26.                'TRCA_LongName "TritonRexx Button-Demo"',
  27.                'TRCA_Info     "Viele, viele Knöppe!"',
  28.                'TRCA_Version  "1.0"',
  29.                'TRCA_Release  "1"',
  30.                'TRCA_Date     "1.8.95"',
  31.                'TAG_END'
  32.  
  33. windowtags =   WindowID(1) WindowPosition('TRWP_CENTERDISPLAY') WindowTitle("Knöppe zum Anklicken"),
  34.                'HorizGroupA Space VertGroupA Space',
  35.                   NamedSeparator('Los gehts'),
  36.                   'Space',
  37.                   Button('_Klick mich',1),
  38.                   'SpaceS',
  39.                   Button('_Drück mich',2),
  40.                   'Space',
  41.                   NamedSeparator('Jetzt nebeneinander'),
  42.                   'Space',
  43.                   'HorizGroup' Button('Ich bin _links',3) 'SpaceS' Button('Ich bin _rechts',4) 'EndGroup',
  44.                   'Space',
  45.                   NamedSeparator('Spezial-Knöppe'),
  46.                   'Space',
  47.                   'HorizGroupSC',
  48.                      TextID('D_atei ',5)       GetFileButton(5)   'Space',
  49.                      TextID('_Verzeichnis ',6) GetDrawerButton(6) 'Space',
  50.                      TextID('_Sonstwas ',7)    GetEntryButton(7),
  51.                   'EndGroup',
  52.                   'Space',
  53.                   NamedFrameBox('Ein Rahmen'),
  54.                   'HorizGroupA Space VertGroupA Space',
  55.                      Button('Ich _bin der dickste von allen',8) 'TRAT_Flags TRBU_YRESIZE',
  56.                      'Space',
  57.                      'HorizGroupS Space' Button('_Mann, is der dick man',9) 'Space EndGroup',
  58.                   'Space EndGroup Space EndGroup',
  59.                'Space EndGroup Space EndGroup EndProject'
  60.  
  61.  
  62. /*
  63. ** Unterbrechungssignale
  64. */
  65.  
  66. SIGNAL ON break_c
  67. SIGNAL ON failure
  68. SIGNAL ON halt
  69. SIGNAL ON ioerr
  70. SIGNAL ON syntax
  71.  
  72.  
  73. /*
  74. ** Applikation erzeugen
  75. */
  76.  
  77. app = TR_CREATEAPP(apptags)
  78.  
  79.  
  80. /*
  81. ** Fenster öffnen
  82. */
  83.  
  84. IF app ~= '00000000'x THEN DO
  85.    window = TR_OPENPROJECT(app,windowtags)
  86.  
  87.    IF window ~= '00000000'x THEN DO
  88.       ende = 0
  89.  
  90.       DO WHILE ~ende
  91.          CALL TR_WAIT(app,'')
  92.  
  93.          DO WHILE TR_HANDLEMSG(app,'event')
  94.             IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN
  95.                ende = 1
  96.          END
  97.       END
  98.  
  99.       CALL TR_CLOSEPROJECT(window)
  100.    END
  101.  
  102.    CALL TR_DELETEAPP(app)
  103. END
  104.  
  105. EXIT(0)
  106.  
  107.  
  108. /*******************************************************************************
  109. ** Routine, die bei einer Unterbrechung des Scripts aufgerufen wird
  110. *******************************************************************************/
  111.  
  112. break_c:
  113. failure:
  114. halt:
  115. ioerr:
  116. syntax:
  117.    SAY '+++ Fehler' rc 'in Zeile' sigl '-' ERRORTEXT(rc)
  118.    SAY SOURCELINE(sigl)
  119.  
  120.    IF app ~= '00000000'x THEN
  121.       CALL TR_DELETEAPP(app)
  122.  
  123.    EXIT(10)
  124.